﻿using System;
using System.Security.Cryptography;
using System.Text;

namespace MyCommon.Security
{
    public class MD5
    {
        public static string Encrypt16(string pwd)
        {
            if (string.IsNullOrWhiteSpace(pwd))
                return "";
            MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
            return BitConverter.ToString(md5.ComputeHash(Encoding.UTF8.GetBytes(pwd)), 4, 8).Replace("-", "");
        }
    }
}
